Learn R Programming

surveillance (version 1.5-4)

[,sts-methods: Extraction and Subsetting of sts objects

Description

Methods for "[", i.e., extraction or subsetting of the "sts" class in package surveillance.

Note that [<--methods methods (i.e. subassigments) are currently not supported.

drop is always FALSE.

Arguments

Examples

Run this code
data("ha.sts")
haagg <- aggregate(ha.sts, nfreq=13)

#A suite of of simple tests (inspired by the Matrix package)
stopifnot(identical(ha.sts, ha.sts[]))


plot(haagg[, 3])       # Single series
plot(haagg[1:30, 3])   # Somewhat shorter

#Counts at time 20
plot(haagg[20, ], type = observed ~1 |unit)

Run the code above in your browser using DataLab